package com.wyx.Dao;

import com.wyx.Pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 用户的DAO层 与数据库进行连接
 */
@Mapper
public interface UserDao {
    @Select("select * from jd_user where username=#{username} and password=#{password}")
    User selectUser(User user);
    @Select("select * from jd_user where username=#{username}")
    User selectUserByusername(String username);
    @Insert("insert into jd_user (username, password,email)values (#{username},#{password},#{email})")
    Integer saveUser(User user);
}
